package com.chinasofti.project.common;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtil {

	private static final String LONG_PATTERN="yyyyMMddHHmmss";
	
	public static String formatLong(Date date){
		return format(date,LONG_PATTERN);
	}
	
	public static String format(Date date,String pattern){
		return getFormat(pattern).format(date);
	}
	
	public static SimpleDateFormat getFormat(String pattern){
		return new SimpleDateFormat(pattern);
	}
}
